package main

import (
	"fmt"
	"time"
)

func example() {
	var i int
	for {
		fmt.Println(i)
		i++
		time.Sleep(time.Millisecond * 30)
	}
}

func main() {
	go example()  // 起一个goroutine
	var j int
	for j > -100 {
		fmt.Println(j)
		j--
		time.Sleep(time.Millisecond * 100)
	}
	fmt.Println("运行结束")
}

